# -*- coding: UTF-8 -*-
"""
@author: tgy
@file: demo01.py
@time: 2021/01/18
"""
import time
from sys import getrefcount

def test():
    age = 0o13456123
    print(getrefcount(age))
    print(age)
    age = 0x122
    print(age)
    age = 0b101
    print(age)
    print(type(hex(123)))
    print('1' + str(1))

def test01():
    ...
    name = '''
def run():
    print('123')
run()
    '''
    print(name)
    eval(name)

def test02():
    ...
    title = "my" 'name' "is" 'tony'
    print(title)
    names = 'zhangsan','lisi'
    print(names)


def test03():
    ...
    for i in range(1,100):
        time.sleep(0.2)
        print("\r{}".format("#"*i), end='')


def test04():
    ...
    odd = '1010'
    num = 0
    while odd:
        num = num*2 + (ord(odd[0]) - ord('0'))
        odd = odd[1:]
    print(num)
    print(chr(65))


if __name__ == '__main__':
    pass
    """
    test03()
    """
    test04()


